<include file="Public:center_header" />
	<div class="content">
		<include file="Public:center_left" />
		<div class="content_right">
			<table class="myAttention" width="100%" cellspacing="0" cellpadding="0">
				<thead>
					<tr>
		            <th style="width: 50px;">ID</th>
		            <th>等级名称</th>

		            <th>查看详情</th>
		            <th>价格</th>
		            <th>期限</th>
		            <th>购买</th>
        		</tr>
				</thead>
				<tbody>
					<tr style="height: 30px;"></tr>
				<volist name="list" id="vo">
           		<tr>
	            <td align="center"><div class="cut_title ellipsis">{$vo.id}</div></td>
	            <td align="center"><div class="cut_title ellipsis">{$vo.name}</div></td>
	      
	            <td align="center">
	            	
                        <a href="javascript:void(0)" _href="{:url('center/ajax_info',array('id'=>$vo.id))}" id="{$data.id}" style="display:block;" class="btn3 read_right" onclick="">
                        查看
                        </a>
                   
	            </td>
	            <td align="center">
	                <if condition="$vo['price'] eq '0'">
	                    免费
	                    <else />
	                    {$vo['price']/100}元
	                </if>
	            </td>
	            <td align="center"> 
	                <if condition="$vo['term'] eq '0'">
	                    无限
	                    <else />
	                    {$vo['term']}月
	                </if>
	            </td>
	            <td align="center">
	            	<if condition="$vo['price'] eq '0'">
	                    <else />
	             
	                    <a href="javascript:void(0)" _href="{:url('Wxpay/index',array('goods_id'=>$vo.id,'TotalFee'=>$vo.price,'user_id'=>$data.id,'product_name'=>$vo.name))}" id="{$data.id}" style="display:block;width: 92px;height: 33px;background: #00B1D7;text-align: center;line-height: 33px;border-radius: 6px;color: #fff;font-size: 14px;" class="btn4 by_qr" onclick="">
                        购买
                        </a>       
	                </if>
	            </td>
	         
           	</tr>
       		</volist>
					
				</tbody>
			</table>
			<div class="line"></div>
			<div class="page">
			    {$page}
			</div>
		</div>
	</div>
	<include file="Public:footer" />
	<script>
	    function project_submit(){
	        $('form').submit();
	    }

	    function change_class(obj){
	    	var status = $(obj).attr('status');
	    	var company_id = $(obj).attr('company_id');
	    	var class_name = $(obj).attr('class');
	    	var bool = false;

	    	var formData = new FormData();
	    	formData.append('status',status);
	        formData.append('company_id',company_id);

	    	$.ajax({
	            url:"{:url('Company/follow')}",
	            type:'POST',
	            data:formData,
	            async:false,
	            processData:false,
	            contentType:false,
	            success:function(result){
	            	if(result.code == 0){
	            		layer.alert(result.msg);
	            		bool = true;
	            	}
	            }

	        });

	        if(bool){
	        	return false;
	        }


	    	$(obj).removeClass('btn1');
	    	$(obj).removeClass('btn3');
	    	//$(obj).attr('status','');

	    	if(class_name == 'btn1'){
	    		$(obj).attr("class","btn3");
	    		$(obj).text("取消关注");
	    		$(obj).attr('status','-1');
	    	}else{
	    		$(obj).attr("class","btn1");
	    		$(obj).attr('status','1');
	    		$(obj).text("+关注");
	    	}
	    	
	    
		}

	    function return_company(obj){
	        var a_href = $(obj).attr('a_href');

	        $.ajax({
	            url:a_href,
	            type:'POST',
	            async:false,
	            processData:false,
	            contentType:false,
	            success:function(result){
	                if(result.code == 0){
	                    layer.alert(result.msg);
	                    return false;
	                }

	                location.href=a_href;
	            }

	        });
	    }

	  $(".read_right").click(function(){
            var id = $(this).attr('id');
            var url = $(this).attr('_href');

            layer.open({
                type: 2,
                title: '查看权限',
                shadeClose: true,
                shade: 0.5,
                area: ['800px', '80%'],
                content: url //iframe的url
            });
        });

        $(".by_qr").click(function(){
            var id = $(this).attr('id');
            var url = $(this).attr('_href');

            layer.open({
                type: 2,
                title: '微信扫码',
                shadeClose: true,
                shade: 0.5,
                area: ['800px', '80%'],
                content: url //iframe的url
            });
        });      
	</script>
</body>
</html>
